﻿using System;
using System.Windows;

namespace LS.DicomViewer
{
    /// <summary>
    /// SetPixelRateWindow.xaml 的交互逻辑
    /// </summary>
    public partial class SetPixelRateWindow
    {
        public Double Rate { get; private set; } = 0;
        public SetPixelRateWindow()
        {
            InitializeComponent();
            this.Icon = Application.Current.MainWindow.Icon;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (double.TryParse(txtValue.Text, out double rate))
            {
                Rate = rate;
                DialogResult = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("输入字符格式有误!");
            }
        }
    }
}
